#include "keyboard.h"
unsigned char KEY_VALUE_TABLE[20] = {
	0xff, 
	0x06, 0x04, 0x0e, 
	0x02, 0x00, 0x0a, 
	0x07, 0x05, 0x0f, 
	0x03, 0x01, 0x0b, 
	0x0c, 0x08, 0x0d, 0x09, 
	0x04, 0x01, 0x00
};

unsigned char KEY[] = {
	0,
	KEY_1,
	KEY_2,
	KEY_3,
	KEY_4,
	KEY_5,
	KEY_6,
	KEY_7,
	KEY_8,
	KEY_9,
	KEY_0,
	KEY_P,
	KEY_CL,
	KEY_FUNC1,
	KEY_FUNC2,
	KEY_FUNC3,
	KEY_FUNC4,
	KEY_FUNC5,
	KEY_FUNC6,
	KEY_FUNC7
};


unsigned char keycode2ascii(unsigned char keycode) 
{
	int i = 0;
	for (i = 0; i < 20; i++) {
		if (keycode == KEY_VALUE_TABLE[i])
			return KEY[i];
	}
	return 0xff;
}